package wcg;

import javax.swing.JPanel;
import java.awt.Frame;
import java.awt.BorderLayout;
import javax.swing.JDialog;
import java.awt.Dimension;
import javax.swing.JButton;
import java.awt.Rectangle;
import javax.swing.JComboBox;
import javax.swing.JLabel;

public class DialogSetResetPattern extends JDialog {

	private static final long serialVersionUID = 1L;
	private JPanel jContentPane = null;
	private JButton jButtonOK = null;
	private JButton jButtonCancel = null;
	private JLabel jLabel = null;
	private JComboBox jComboBoxNumber = null;
	private JLabel jLabel1 = null;
	private JComboBox jComboBoxSetReset = null;
	private JComboBox jComboBoxEquals = null;
	public  boolean Equal = false;
	public  int     Number = 0;
	public  boolean Set = false;
	public  boolean OK = false;
	/**
	 * @param owner
	 */
	public DialogSetResetPattern(Frame owner) {
		super(owner,true);
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(562, 193);
		this.setTitle("Special Pattern Setting Dialog");  // Generated
		this.setContentPane(getJContentPane());
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jLabel1 = new JLabel();
			jLabel1.setBounds(new Rectangle(366, 20, 39, 22));  // Generated
			jLabel1.setText("then");  // Generated
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(44, 20, 159, 22));  // Generated
			jLabel.setText("If least digit of channel ");  // Generated
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.add(getJButtonOK(), null);  // Generated
			jContentPane.add(getJButtonCancel(), null);  // Generated
			jContentPane.add(jLabel, null);  // Generated
			jContentPane.add(getJComboBoxNumber(), null);  // Generated
			jContentPane.add(jLabel1, null);  // Generated
			jContentPane.add(getJComboBoxSetReset(), null);  // Generated
			jContentPane.add(getJComboBoxEquals(), null);  // Generated
		}
		return jContentPane;
	}

	/**
	 * This method initializes jButtonOK	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonOK() {
		if (jButtonOK == null) {
			jButtonOK = new JButton();
			jButtonOK.setBounds(new Rectangle(427, 110, 97, 30));  // Generated
			jButtonOK.setText("OK");  // Generated
			jButtonOK.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					OK = true;
					Number = jComboBoxNumber.getSelectedIndex();
					if(jComboBoxSetReset.getSelectedIndex()==0) Set=true;
					else Set=false;
					if(jComboBoxEquals.getSelectedIndex()==0) Equal=true;
					else Equal=false;
					setVisible(false);
				}
			});
		}
		return jButtonOK;
	}

	/**
	 * This method initializes jButtonCancel	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonCancel() {
		if (jButtonCancel == null) {
			jButtonCancel = new JButton();
			jButtonCancel.setBounds(new Rectangle(326, 109, 91, 31));  // Generated
			jButtonCancel.setText("Canncel");  // Generated
			jButtonCancel.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					setVisible(false);
				}
			});
			
		}
		return jButtonCancel;
	}

	/**
	 * This method initializes jComboBoxNumber	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxNumber() {
		if (jComboBoxNumber == null) {
			jComboBoxNumber = new JComboBox();
			jComboBoxNumber.setBounds(new Rectangle(301, 20, 56, 22));  // Generated
			jComboBoxNumber.addItem("0");
			jComboBoxNumber.addItem("1");
			jComboBoxNumber.addItem("2");
			jComboBoxNumber.addItem("3");
			jComboBoxNumber.addItem("4");
			jComboBoxNumber.addItem("5");
			jComboBoxNumber.addItem("6");
			jComboBoxNumber.addItem("7");
			jComboBoxNumber.addItem("8");
			jComboBoxNumber.addItem("9");
			jComboBoxNumber.addItem("A");
			jComboBoxNumber.addItem("B");
			jComboBoxNumber.addItem("C");
			jComboBoxNumber.addItem("D");
			jComboBoxNumber.addItem("E");
			jComboBoxNumber.addItem("F");
			jComboBoxNumber.setSelectedIndex(0);
			
		}
		return jComboBoxNumber;
	}

	/**
	 * This method initializes jComboBoxSetReset	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxSetReset() {
		if (jComboBoxSetReset == null) {
			jComboBoxSetReset = new JComboBox();
			jComboBoxSetReset.setBounds(new Rectangle(415, 20, 71, 22));  // Generated
			jComboBoxSetReset.addItem("Set");
			jComboBoxSetReset.addItem("Reset");
			jComboBoxSetReset.setSelectedIndex(0);
		}
		return jComboBoxSetReset;
	}

	/**
	 * This method initializes jComboBoxEquals	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxEquals() {
		if (jComboBoxEquals == null) {
			jComboBoxEquals = new JComboBox();
			jComboBoxEquals.setBounds(new Rectangle(206, 20, 78, 22));  // Generated
			jComboBoxEquals.addItem("equals");
			jComboBoxEquals.addItem("not equals");
			jComboBoxEquals.setSelectedIndex(0);		
		}
		return jComboBoxEquals;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
